export function debounce(fn, delay) {
    let timer;
    return function () {
        let me = this;
        timer && clearInterval(timer);
        timer = setTimeout(function () {
            fn.call(me);
        }, delay);
    };
}